package com.gosuncn.listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.stereotype.Component;

/**
 * 这个上下文刷新事件是在 Spring 应用上下文(ApplicationContext)刷新之后发送。
 */
@Component
@Slf4j
public class ApplicationRefreshedListener implements ApplicationListener<ContextRefreshedEvent> {
    @Override
    public void onApplicationEvent(ContextRefreshedEvent contextRefreshedEvent) {
        log.info("Application contextRefreshedEvent 启动成功");
    }
}
